;Assembler header file for InverseTable
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:03:53 2005
;Tom Hughes, tom@compton.nu, 21 Nov 2002

        [       :LNOT: :DEF: InverseTable_Hdr
        GBLS    InverseTable_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_OSSpriteOp
        GBLS    Get_OSSpriteOp
        ]
        [       :LNOT: :DEF: OSSpriteOp_Hdr
Get_OSSpriteOp                  SETS    "GET oslib/OSSpriteOp.Hdr"
        |
Get_OSSpriteOp                  SETS    ""
        ]
        $Get_OSSpriteOp

;Symbols for constants
InverseTable_RShift             *       0
InverseTable_GShift             *       5
InverseTable_BShift             *       10
InverseTable_R                  *       &1F
InverseTable_G                  *       &3E0
InverseTable_B                  *       &7C00

;Symbols for structure offsets and sizes
                                ^       0
                                #       Bits
InverseTable_Colour             *       @


;Symbols for SWI's and SWI reason codes
XInverseTable_CalculateTable    *       &6BF40
InverseTable_CalculateTable     *       &4BF40
   ;Exit
   ;  R0 = gcol_to_colour (pointer to InverseTable_Colour)
   ;  R1 = colour_to_gcol (pointer to OS_GCOL)

XInverseTable_SpriteTableForSprite *       &6BF41
InverseTable_SpriteTableForSprite *       &4BF41
   ;Entry
   ;  R0 = gcol_to_colour_in (pointer to InverseTable_Colour)
   ;  R1 = colour_to_gcol_in (pointer to OS_GCOL)
   ;  R2 = area (OSSpriteOp_Area)
   ;  R3 = id (OSSpriteOp_Id)
   ;Exit
   ;  R0 = gcol_to_colour_out (pointer to InverseTable_Colour)
   ;  R1 = colour_to_gcol_out (pointer to OS_GCOL)

XInverseTable_SpriteTableForMode *       &6BF41
InverseTable_SpriteTableForMode *       &4BF41
   ;Entry
   ;  R0 = gcol_to_colour_in (pointer to InverseTable_Colour)
   ;  R1 = colour_to_gcol_in (pointer to OS_GCOL)
   ;  R2 = mode (OS_Mode)
   ;  R3 = &0
   ;Exit
   ;  R0 = gcol_to_colour_out (pointer to InverseTable_Colour)
   ;  R1 = colour_to_gcol_out (pointer to OS_GCOL)

        ]
        END
